
//递归实现（不推荐）
int fi1(int x)
{
	if (1 == x || 2 == x)
		return 1;
	else
		return fi1(x - 2) + fi1(x - 1);
}

//数组实现
int fi2(int x)
{
	int a = 0;
	int arr[100] = { 1,1 };
	if (1 == x || 2 == x)
		return 1;
	for (a = 0;a < x-2;a++)
		arr[a+2] = arr[a] + arr[a+1];
		return arr[x-1];
}

//变量传值实现
int fi3(int x)
{
	int a, b, c;
	a = 1;
	b = 1;
	c = 2;
	if (1 == x || 2 == x)
		return 1;
	else if (3 == x)
		return 2;
	for (;x>2;x--)
	{
		c = a + b;
		a = b;
		b = c;
	}
	return c;
}